#ifndef ECOCICTY_CUSTOMER_H
#define ECOCICTY_CUSTOMER_H

#include <QString>
#include <vector>

namespace ecocity
{

class Customer
{

public:

    enum TYPE
    {
        UKNOWN           = 0,
        FRIENDS          = 1,
        COOPERATIVA      = 2,
        TIENDA           = 3,
        CONSUMIDOR_FINAL = 4
    };

    Customer( int id = -1,
              const QString& name = QString( ),
              const QString& address = QString( ),
              const QString& phone = QString( ),
              const QString& nif = QString( ),
              TYPE type = FRIENDS );

    int id( ) const;

    const QString& name( ) const;
    const QString& address( ) const;
    const QString& phone( ) const;
    const QString& nif( ) const;

    TYPE type( ) const;

    int total_sold( ) const;

    static const QString to_string( TYPE type );
    static TYPE to_customer_type( const QString& type );

private:

    int m_id;

    QString m_name;

    QString m_address;

    QString m_phone;

    QString m_nif;

    TYPE m_type;
};

}      // namespace ecocity

#endif // ECOCICTY_CUSTOMER_H
